<template>
    <div class="TaskCard" v-if="showState">
        这是一个卡片 : {{ actTypeStr }}
    </div>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import { GetTask } from './TaskEvent';


const props = defineProps(['item']);
const actTypeStr = ref('');
const showState = ref(false);
onMounted(async () => {
    const Tasks = GetTask()
    const actType = props.item?.actType;
    for (const key in Tasks) {
        const Event = Tasks[key];
        if (Event(actType)) {
            actTypeStr.value = key;
            showState.value = true;
            break;
        }
    }
})


</script>
<style lang="less" scoped></style>